import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@/views/Home.vue'
import Singer from '@/views/Singer.vue'
import SongSheet from '@/views/SongSheet.vue'
import TheCharts from '@/views/TheCharts.vue'
import Musiclistdetail from '@/components/musiclistdetail/Musiclistdetail.vue'
import SearchDetail from '@/components/search/SearchDetail.vue'

Vue.use(VueRouter)
const routes = [{
        path: '/',
        redirect: '/home'
    },
    {
        path: '/home',
        name: "home",
        component: Home
    },
    {
        path: '/song_sheet',
        name: 'song_sheet',
        component: SongSheet
    },
    {
        path: '/the_chart',
        name: 'the_chart',
        component: TheCharts
    },
    {
        path: '/singer',
        name: 'singer',
        component: Singer
    },
    {
        path:'/musiclistdetail/:id',
        name:'musiclistdetail',
        component:Musiclistdetail
    },{
        path:'/searchdetail',
        name:'searchdetail',
        component:SearchDetail
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router